{% extends "admin_content.html" %}
{% load i18n %}
{% load adminmedia %}

{% block extrascripts2 %}
{% ifequal query.pop 'pop=1' %} <!-- FileBrowseField -->
<script language="javascript" type="text/javascript" src="/media/filebrowser/js/FB_FileBrowseField.js"></script>
{% endifequal %}
{% ifequal query.pop 'pop=2' %} <!-- TinyMCE -->
<!--  <script language="javascript" type="text/javascript" src="/media/tinymce/jscripts/tiny_mce/tiny_mce_popup_fb.js"></script> -->
<!--  <script language="javascript" type="text/javascript" src="/media/filebrowser/js/FB_TinyMCE.js"></script> -->
{% endifequal %}
{% endblock %}
{% block extrastyles %}
<link rel="stylesheet" type="text/css" href="/media/filebrowser/css/filebrowser.css" />
{% if query.pop %}

<style type="text/css">
	.breadcrumbs { display: none; }
</style>
{% endif %}
{% endblock %}

{% block content-selected %}{% endblock %}
{% block users-selected %}{% endblock %}
{% block filebrowser-selected %}class="selected"{% endblock %}

{% block subheader %}
<h1>{% trans "FileBrowser" %}</h1>
{% endblock %}

{% block content %}
<div class="fieldset" style="overflow:hidden;zoom:1;clear:both;height:400px">
    {% if query.pop %}
    <div class="fb_breadcrumbs">{{ breadcrumbs }}</div>
    {% endif %}
    
    <div id="content-main" style="height:40px;">&nbsp;<br/>
        <ul class="object-tools">
            <li><a href="mkdir/{{ query.query_str_total }}" class="addlink">{% trans "Crea Directory" %}</a></li>
            <li><a href="upload/{{ query.query_str_total }}" class="addlink">{% trans "Carica Files" %}</a></li>
            {% if not query.pop %}
            {% if settings_var.USE_PICNIK %}
            <li><a href="http://www.picnik.com/service?_apikey={{ settings_var.PICNIK_KEY }}&_page=/in/upload&_export={{ settings_var.CALLBACK_URL }}picnik_callback/" class="addlink">{% trans "Picnik-Upload" %}</a></li>
            {% endif %}
            {% endif %}
            <li><a href="makethumbs/{{ query.query_str_total }}" class="addlink">{% trans "Crea Thumbs" %}</a></li>
        </ul>
        <div class="module filtered" id="changelist">
            {% include "filebrowser/include/toolbar.html" %}
            {% include "filebrowser/include/filter.html" %}
            <div id="toolbartable">
            <table cellspacing="0">
                {% if results_var.results_current %}
                    {% include "filebrowser/include/tableheader.html" %}
                {% endif %}
                <tbody>
                {% for file in file_dict %}
                    {% include "filebrowser/include/filelisting.html" %}
                {% endfor %}
                </tbody>
            </table>
            </div>
            {% include "filebrowser/include/paginator.html" %}
        </div>
    </div>
</fieldset>
{% endblock %}
